package main

import (
	"fmt"
	"time"
)

// 输出数字
func printNum() {
	for i := 1; i <= 100; i++ {
		fmt.Println("打印数字:", i)
	}
}

// 除法操作
func devide() {
	defer func() {
		if err := recover(); err != nil {
			fmt.Println("devide() 发生错误", err)
		}
	}()
	var a = 10
	var b = 0
	c := a / b
	fmt.Println("c=", c)
}

func main() {
	go printNum()
	go devide()
	time.Sleep(5 * time.Second)
}
